import logging

import pytest


class Test:

    @pytest.mark.parametrize('setup_teardown', [None], indirect=True)
    def test(self, setup_teardown, device):
        logging.info('步骤1.按power键进行唤醒测试')
        device.suspend()
        device.wait(2)
        device.press_power_key()
        device.wait(2)
        logging.info('预期结果1.能进入唤醒模式')
        screen_state = device.display_screen_status().get('state')
        assert screen_state == 2, '唤醒失败'
